/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.tom.social.fetcher.crawler;

import com.torunski.crawler.events.ILoadingEventListener;
import com.torunski.crawler.events.LoadingEvent;
import org.apache.log4j.Logger;
import pl.tom.social.common.jade.TaskBarProxy;

/**
 *
 * @author Tom
 */
public class UpdateTaskBarListener implements ILoadingEventListener {
	private static final Logger logger = Logger.getLogger(UpdateTaskBarListener.class);
	TaskBarProxy taskBar;

	public UpdateTaskBarListener(TaskBarProxy taskBar) {
		this.taskBar = taskBar;
	}

	public void beforeLoading(LoadingEvent event) {
		String link = event.getLink().getURI();
		taskBar.update(link);
	}

	public void afterLoading(LoadingEvent event) {
	}
}
